package com.warm.pump.module.sys.dao.gen;

import java.util.List;
import java.util.HashMap;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.sys.bean.bo.gen.SysUserBo;
import com.warm.pump.module.sys.mapper.gen.SysUserBoMapper;
@Repository
public class SysUserBoDao  {
	// 日志对象
	private transient Log log = LogFactory.getLog(this.getClass());
	@Autowired
	private SysUserBoMapper sysUserBoMapper;

	public List<String> queryAllPerms(Map conditionMap){
		return sysUserBoMapper.queryAllPerms(conditionMap);
	}
	public PageBean queryAllPermsPage(Map conditionMap,int pageNo,int pageSize){
		Integer count = queryAllPermsCount(conditionMap);
		PageBean pageBean = new PageBean();
		pageBean.setCount(count);
		pageBean.setPageNo(pageNo);
		pageBean.setPageSize(pageSize);
		conditionMap.put("limitStart",pageBean.getStartNo());
		conditionMap.put("limitOffset",pageSize);
		pageBean.setData(sysUserBoMapper.queryAllPerms(conditionMap));
		return pageBean;
	}
	public Integer queryAllPermsCount(Map conditionMap){
		return sysUserBoMapper.queryAllPermsCount(conditionMap);
	}
    public List<Long> queryAllMenuId(Map conditionMap){
        return sysUserBoMapper.queryAllMenuId(conditionMap);
    }
    public PageBean queryAllMenuIdPage(Map conditionMap,int pageNo,int pageSize){
        Integer count = queryAllMenuIdCount(conditionMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        conditionMap.put("limitStart",pageBean.getStartNo());
        conditionMap.put("limitOffset",pageSize);
        pageBean.setData(sysUserBoMapper.queryAllMenuId(conditionMap));
        return pageBean;
    }
    public Integer queryAllMenuIdCount(Map conditionMap){
        return sysUserBoMapper.queryAllMenuIdCount(conditionMap);
    }
    public List<Long> queryRoleIdList(Map conditionMap){
        return sysUserBoMapper.queryRoleIdList(conditionMap);
    }
    public PageBean queryRoleIdListPage(Map conditionMap,int pageNo,int pageSize){
        Integer count = queryRoleIdListCount(conditionMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        conditionMap.put("limitStart",pageBean.getStartNo());
        conditionMap.put("limitOffset",pageSize);
        pageBean.setData(sysUserBoMapper.queryRoleIdList(conditionMap));
        return pageBean;
    }
    public Integer queryRoleIdListCount(Map conditionMap){
        return sysUserBoMapper.queryRoleIdListCount(conditionMap);
    }
    public List<Long> queryMenuIdList(Map conditionMap){
        return sysUserBoMapper.queryMenuIdList(conditionMap);
    }
    public PageBean queryMenuIdListPage(Map conditionMap,int pageNo,int pageSize){
        Integer count = queryMenuIdListCount(conditionMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        conditionMap.put("limitStart",pageBean.getStartNo());
        conditionMap.put("limitOffset",pageSize);
        pageBean.setData(sysUserBoMapper.queryMenuIdList(conditionMap));
        return pageBean;
    }
    public Integer queryMenuIdListCount(Map conditionMap){
        return sysUserBoMapper.queryMenuIdListCount(conditionMap);
    }
}
